Add accel option to vif xend config.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 9 Jul 2007 17:10:48 +0000 (18:10 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 9 Jul 2007 17:10:48 +0000 (18:10 +0100)
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
tools/python/xen/xend/server/netif.py
tools/python/xen/xm/create.py

index 3c70b389be0b227af1aaa65d01379878d4296a6d..130668428cd9cdb8dac89fcd800b499680bc3eeb 100644 (file)
@@ -107,6 +107,7 @@ class NetifController(DevController):
         uuid    = config.get('uuid')
         ipaddr  = config.get('ip')
         model   = config.get('model')
+        accel   = config.get('accel')
 
         if not typ:
             typ = xoptions.netback_type
@@ -131,6 +132,8 @@ class NetifController(DevController):
             back['uuid'] = uuid
         if model:
             back['model'] = model
+        if accel:
+            back['accel'] = accel
 
         config_path = "device/%s/%d/" % (self.deviceClass, devid)
         for x in back:
@@ -157,10 +160,10 @@ class NetifController(DevController):
         config_path = "device/%s/%d/" % (self.deviceClass, devid)
         devinfo = ()
         for x in ( 'script', 'ip', 'bridge', 'mac',
-                   'type', 'vifname', 'rate', 'uuid', 'model' ):
+                   'type', 'vifname', 'rate', 'uuid', 'model', 'accel'):
             y = self.vm._readVm(config_path + x)
             devinfo += (y,)
-        (script, ip, bridge, mac, typ, vifname, rate, uuid, model) = devinfo
+        (script, ip, bridge, mac, typ, vifname, rate, uuid, model, accel) = devinfo
 
         if script:
             result['script'] = script
@@ -180,5 +183,7 @@ class NetifController(DevController):
             result['uuid'] = uuid
         if model:
             result['model'] = model
+        if accel:
+            result['accel'] = accel
             
         return result
index 79fa947bb61a9d7a20d2241656f4fa518d01341b..b75f478a745da41e2cd771f935c71549eb4491b9 100644 (file)
@@ -710,7 +710,7 @@ def configure_vifs(config_devs, vals):
 
         def f(k):
             if k not in ['backend', 'bridge', 'ip', 'mac', 'script', 'type',
-                         'vifname', 'rate', 'model']:
+                         'vifname', 'rate', 'model', 'accel']:
                 err('Invalid vif option: ' + k)
 
             config_vif.append([k, d[k]])